package com;


import java.util.ArrayList;
import java.util.Collections;

/**
 * @Author weijingchen
 * @Date 2025/6/23 10:18
 * @Version 1.0.0
 */
public class Demo {
    public static void main(String[] args) {
        ArrayList<Integer> integers = new ArrayList<>();
        integers.add(1);
        integers.add(2);
        integers.add(3);
        Integer max = Collections.max(integers);
        System.out.println(max);
        // 求数组的和
        int sum = integers.stream().mapToInt(Integer::intValue).sum();
    }
}
